<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt"%>
<!DOCTYPE html>
<html lang="zh-cn">
<head>
<!-- Meta, title, CSS, favicons, etc. -->
<meta charset="utf-8">
<title></title>
<%
	String path = request.getContextPath();
	// 获得本项目的地址(例如: http://localhost:8080/MyApp/)赋值给basePath变量 
	String basePath = request.getScheme() + "://" + request.getServerName() + ":" + request.getServerPort()
			+ path + "/";
	// 将 "项目路径basePath" 放入pageContext中，待以后用EL表达式读出。 
	pageContext.setAttribute("basePath", basePath);
	//out.write(basePath);
%>

<!-- Bootstrap core CSS -->
<link href="<%=basePath%>bootstrap3/css/bootstrap.min.css"
	rel="stylesheet">
<link href="data:text/css;charset=utf-8,"
	data-href="<%=basePath%>bootstrap3/css/bootstrap-theme.min.css"
	rel="stylesheet" id="bs-theme-stylesheet">
<link href="<%=basePath%>bootstrap3/css/docs.min.css" rel="stylesheet">

<script src="<%=basePath%>bootstrap3/js/jquery.min.js"></script>

<script src="<%=basePath%>bootstrap3/js/bootstrap.min.js"></script>

<script src="<%=basePath%>bootstrap3/js/docs.min.js"></script>

<script src="<%=basePath%>bootstrap3/js/ie10-viewport-bug-workaround.js"></script>
<style type="text/css">
#head {
	height: 100px;
	width: 100%;
	background: #F5E79E;
	margin-left: auto;
	margin-right: auto;
}
</style>
</head>

<body style="background: #BBBBBB;">
	<div id="head">
		<div
			style="height: 100%; width: 50%; margin-left: auto; margin-right: auto;">
			<font color="#973634" size="7">郴电国际消息栏
				</h1>
			</font><br /> <font color="#973634" size="5">提供当前电力的最新消息</font>
		</div>
	</div>
	<div style="height: 30px; width: 100%;"></div>
	<div align="center">
		<c:forEach items="${sessionScope.allInfo}" var="info">
			<div class="list-group" style="width: 50%;">
				<a class="list-group-item active" style="background: #265A88;">
					<h2 class="list-group-item-heading">${info.titlt }
						<span class="badge" style="color: #003399; background: #99CCFF;"><fmt:formatDate
									value="${info.pubdate }" pattern="yyyy年MM月dd日HH时mm分" /></span>
					</h2>
					<h4><p class="list-group-item-text" align="left">&nbsp;&nbsp;${info.content }</p></h4>
					<h4><p class="list-group-item-text" align="right">${info.pubman }</p></h4>
				</a>
			</div>
		</c:forEach>
	</div>
</body>

</html>